﻿<?xml version="1.0" encoding="utf-8"?>
<Content type="xform" name="EditContent">
  <model>
    <instance>
      <tblContent>
        <nContentKey/>
        <nContentPrimaryId/>
        <nVersion/>
        <cContentForiegnRef/>
        <cContentName/>
        <cContentSchemaName>Module</cContentSchemaName>
        <cContentXmlBrief>
          <Content moduleType="ImageFader" contentType="Image" box="" title="" link="" linkType="internal" linkText="More images" sortBy="Position" order="descending" cols="1" stepBy="" stepCount="0" display="related" position="" fadingspeed="2000" fadebetween="2000" slideshowtype="sequence"/>
        </cContentXmlBrief>
        <cContentXmlDetail/>
        <nAuditId/>
        <nAuditKey/>
        <dPublishDate/>
        <dExpireDate/>
        <dInsertDate/>
        <nInsertDirId/>
        <dUpdateDate/>
        <nUpdateDirId/>
        <nStatus>1</nStatus>
        <cDescription/>
        <bCascade/>
      </tblContent>
    </instance>
    <submission id="EditContent" action="" method="post" event="return form_check(this)"/>
    <bind id="cModuleTitle" nodeset="tblContent/cContentName" required="false()" type="string"/>
    <bind nodeset="tblContent/cContentXmlBrief/Content">
      <bind id="cPosition" nodeset="@position" required="true()" type="string"/>
      <bind id="cModuleType" nodeset="@moduleType" required="true()" type="string"/>
      <bind id="cModuleBox" nodeset="@box" required="false()" type="string"/>
      <bind id="cModuleTitle" nodeset="@title" required="false()" type="string"/>
      <bind id="cModuleLink" nodeset="@link" required="false()" type="string"/>
      <bind id="cLinkType" nodeset="@linkType" required="false()" type="string"/>
      <bind id="cModuleLinkText" nodeset="@linkText" required="false()" type="string"/>
      <bind id="nColumns" nodeset="@cols" required="false()" type="string"/>
      <bind id="nStepCount" nodeset="@stepCount" required="false()" type="string"/>
      <bind id="cDisplay" nodeset="@display" required="false()" type="string"/>
      <bind id="cSortBy" nodeset="@sortBy" required="false()" type="string"/>
      <bind id="cStepBy" nodeset="@stepBy" required="false()" type="string"/>
      <bind id="cPageOrder" nodeset="@order" required="false()" type="string"/>
      <bind id="cAnimationType" nodeset="@animationtype" required="true()" type="string"/>
      <bind id="cFadingSpeed" nodeset="@fadingspeed" required="true()" type="string"/>
      <bind id="cFadeBetween" nodeset="@fadebetween" required="true()" type="string"/>
      <bind id="cSlideshowType" nodeset="@slideshowtype" required="true()" type="string"/>
      <bind id="cSlideHeight" nodeset="@SlideHeight" required="true()" type="string"/>
      <bind id="cSlideWidth" nodeset="@SlideWidth" required="true()" type="string"/>
    </bind>
    <bind id="cContentBody" nodeset="tblContent/cContentXmlBrief/Content" required="false()" type="string"/>
    <ewInclude filePath="/ewcommon/xforms/content/module/genericModule.xml" xPath="descendant-or-self::bind[@nodeset='tblContent/cContentXmlBrief/Content']"/>
    <ewInclude filePath="/ewcommon/xforms/content/module/genericModule.xml" xPath="descendant-or-self::bind[@nodeset='tblContent']"/>
  </model>
  <group ref="EditContent" class="2col">
    <label>Image Fader Module</label>
    <group>
      <group>
        <!-- These hidden fields and bindings are required for the component-->
        <input bind="nContentKey" class="hidden">
          <label>ContentId</label>
        </input>
        <input bind="cModuleType" class="hidden">
          <label>ModuleType</label>
        </input>
        <!-- end of hidden fields -->
        <ewInclude filePath="/ewcommon/xforms/content/module/genericModule.xml" xPath="descendant-or-self::group[@id='presentation']"/>
        <ewInclude filePath="/ewcommon/xforms/content/module/genericModule.xml" xPath="descendant-or-self::group[@id='publish']"/>
      </group>

    </group>

    <group>
      <group>
        <label>Content</label>
        <input bind="cModuleTitle" class="long">
          <label>Title or Name</label>
        </input>

        <select1 bind="cDisplay" appearance="full" class="required">
          <label>Show Items</label>
          <item>
            <label>All items on the current page</label>
            <value>all</value>
            <toggle case="cDisplay_1" event="DOMActivate"/>
          </item>
          <item>
            <label>Related items specified below</label>
            <value>related</value>
            <toggle case="cDisplay_2" event="DOMActivate"/>
          </item>
        </select1>

        <switch class="disable">
          <case id="cDisplay_1"/>
          <case id="cDisplay_2">
            <relatedContent search="find add" type="Image" relationType="" direction="1way">
              <label>Image</label>
            </relatedContent>
          </case>
        </switch>

      </group>
      <group class="inline">
        <label>Animation Effects</label>
        <input bind="cFadingSpeed" class="vshort">
          <label>Image Fade Time (default 2000)</label>
          <help class="inline">Time image takes to fade in milliseconds - Default is 2000</help>
        </input>
        <input bind="cFadeBetween" class="vshort">
          <label>Time between fades (default 2000)</label>
          <help class="inline">Time between the fades in milliseconds - Default is 2000. Please note that if multiple image sliders are used on a page, they will all use the same timing. Therefore if you cant see this time coming through, please make sure no other image faders are present on the page</help>
        </input>
        <input bind="cSlideWidth" class="vshort">
          <label>Slide Width (in pixels)</label>
        </input>
        <input bind="cSlideHeight" class="vshort">
          <label>Slide Height (in pixels)</label>
        </input>
        <select1 bind="cSlideshowType" class="boxStyle" appearance="full">
          <label>Type of slideshow</label>
          <item>
            <label>Sequence</label>
            <value>sequence</value>
          </item>
          <item>
            <label>Random</label>
            <value>random</value>
          </item>
        </select1>
      </group>
    </group>
  </group>
  <group ref="submit" class="contentSubmit">
    <submit submission="" ref="ewSubmit" class="principle">
      <label>Save Image Fader Module</label>
    </submit>
  </group>
</Content>
